home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 4
/
Aminet 4 - November 1994.iso
/
aminet
/
dev
/
gcc
/
libnix.lha
/
gnu
/
lib
/
libnix
/
sources.lha
/
math
/
trans
/
atan2.c
< prev
next >
Encoding:
Amiga
Atari
Commodore
DOS
FM Towns/JPY
Macintosh
Macintosh JP
Macintosh to JP
NeXTSTEP
RISC OS/Acorn
Shift JIS
UTF-8
Wrap
C/C++ Source or Header
|
1994-07-03
|
373 b
|
15 lines
#ifdef __GNUC__
#include <inline/mathieeedoubtrans.h>
#endif
#define PI 3.14159265358979323846
static inline double atan(double x)
{ return IEEEDPAtan(x); }
double atan2(double y,double x)
{ return x<=y?(x>=-y? atan(y/x): -PI/2-atan(x/y)):
(x>=-y? PI/2-atan(x/y):y>=0? PI +atan(y/x):
-PI +atan(y/x));
}